package com.xcexample.adclasscard.net


import okhttp3.ResponseBody
import retrofit2.Call
import retrofit2.http.*


//var BaseURL = "https://banpai84api.bigchun.com/"
var BaseURL = "https://banpaiapi.bigchun.com/"

interface NetCall {

    /**
     * 获取用户详情
     */
    @POST("/ad_equip/getAd")
    fun getHome(): Call<ResponseBody>

    @POST("/app_version/autoConfig")
    fun autoConfig(): Call<ResponseBody>

    @POST("/app_version/newest")
    fun appUpdate(): Call<ResponseBody>

    @FormUrlEncoded
    @POST("/elecard/online")
    fun online(@Field("mac") mac: String?): Call<ResponseBody>

    /**
     * 密码登录
     */
    @FormUrlEncoded
    @POST("/login/elecard")
    fun loginByPwd(
        @Field("username") username: String?,
        @Field("password") password: String?,
        @Field("mac") mac: String?
    ): Call<ResponseBody?>?

    @FormUrlEncoded
    @POST("/login/elecardout")
    fun logoutByPwd(
        @Field("username") username: String?,
        @Field("password") password: String?
    ): Call<ResponseBody?>?

}